<button type=button id='attach-<%= image.name -%>' data-toggle="modal" data-target="#image-gallery" class='btn btn-info btn-sm attach-gallery-image'>
  select
</button>
<button class="btn btn-success btn-sm photo-popover image-preview <%= :hidden unless image.try(:url).present? -%>" type='button'
  data-container="body"
  data-toggle="popover"
  data-title="photo"
  data-html="true"
  data-trigger="click"
  data-placement="auto bottom"
  data-content='<p><%= image_tag image, width: 200, class: 'thumbnail' %></p>'>view</button>
